from base.base import Base
from time import sleep
from selenium.webdriver.common.by import By
class Guanzhu(Base):
    guanzhu = (By.ID,'com.kongfz.app:id/lav_2')
    guanzhuanniu = (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout[2]/android.view.ViewGroup/android.view.ViewGroup/androidx.viewpager.widget.ViewPager/androidx.recyclerview.widget.RecyclerView/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.view.ViewGroup/androidx.recyclerview.widget.RecyclerView/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.view.ViewGroup/android.widget.ImageView')
    sandian = (By.XPATH,'//android.widget.TextView[@resource-id="com.kongfz.app:id/tv_navigation"]')
    quxiao = 'new UiSelect().text("取消关注")'
    dy = (By.ID,'com.kongfz.app:id/lottie_attention')
    dy2=(By.ID,'com.kongfz.app:id/tv_navigation')
    def guanzhuyewu(self):
        self.loc_ele(self.guanzhu).click()
        sleep(2)
        self.loc_ele(self.guanzhuanniu).click()
        sleep(2)
        self.loc_wait_ele(self.sandian).click()
        sleep(2)
        self.loc_ui_ele(self.quxiao).click()
        sleep(2)